package com.conversationboard.upload;

public class IllegalFileChecker {

	/**
	 * Ensure that J2EE files that could potentially be executed or change the configuration on the server from being uploaded.
	 * 
	 * @param fileName
	 * @return
	 */

	public static boolean isIllegalFile(String fileName) {

		fileName = fileName.toLowerCase().trim();

		if (fileName.equals("web.xml") || fileName.endsWith(".class") || fileName.endsWith(".jsp") || fileName.endsWith(".jspx")) {
			return true;
		}

		return false;
	}

}
